package com.group01.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.base.MPJBaseMapper;
import com.group01.dto.Order.OrderDTO;
import com.group01.pojo.Order;
import com.group01.vo.Order.OrderGetInfoVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 19559
* @description 针对表【es_order(订单表)】的数据库操作Mapper
* @createDate 2024-06-22 12:11:46
* @Entity com.group01.pojo.Order
*/
public interface OrderMapper extends MPJBaseMapper<Order> {

    /**
     * 分页 + 条件查询订单信息
     */
    IPage<Order> getOrderPageInfo(Page<Order> page, @Param(Constants.WRAPPER) Wrapper<Order> wrapper);

    /**
     * 根据订单编号查询订单信息
     */
    OrderGetInfoVO getOrderGetInfoById(@Param(Constants.WRAPPER) Wrapper<Order> wrapper);

    /**
     * 查询当前用户的所有订单信息
     */
    List<Order> getOrderListInfo(@Param(Constants.WRAPPER) Wrapper<Order> wrapper);

    /**
     * 新增订单信息
     */
    Integer addOrderInfo(@Param("uuid") String uuid , @Param("order") OrderDTO orderDTO, @Param("userId") Integer userId);
}




